Recording device, access device, recording system, and recording method

ABSTRACT

A recording device operates in accordance with an instruction from an access device. The recording device comprising a nonvolatile memory that stores data, a communication unit that receives an instruction issued by the access device, and a memory controller that controls the nonvolatile memory. When a recording instruction for recording data into the nonvolatile memory is received from the access device, the memory controller starts recording of data into the nonvolatile memory. When the memory controller receives from the access device a suspension instruction for suspending the recording of data, the memory controller stores suspension information into the nonvolatile memory, the suspension information indicating a suspended position as a position in a recording area of the nonvolatile memory at which the data is being recorded upon reception of the suspension instruction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation application of International Application No.PCT/JP2013/002529, with an international filing date of Apr. 12, 2013,which claims priority of Japanese Patent Application No. 2012-174661filed on Aug. 7, 2012, the contents of which are incorporated herein byreference.

TECHNICAL FIELD

The present disclosure relates to a recording device that stores datainto a nonvolatile memory, an access device that accesses the recordingdevice, and a recording system provided with the recording device andthe access device.

BACKGROUND ART

There exist various kinds of recording mediums for recording digitaldata like music content and video data, such as a magnetic disk, anoptical disk and a magneto-optical disk. Among these recording mediums,there is known a memory card using a semiconductor memory such as aflash ROM as a storage device. Since reduction in size of the recordingmedium is realized, the memory card using the semiconductor memory hasrapidly spread in use mainly for small-sized portable equipment such asa digital still camera and a mobile phone terminal. Further, thesemiconductor memory has come to be used in applications as a storagebuilt in equipment, as well as in applications as a detachable removablemedium such as the conventional memory card. For example, by building asemiconductor memory such as a flash ROM in equipment, the semiconductormemory is used in place of a hard disk.

As such a memory card and a storage built in equipment, a semiconductordevice called a NAND flash memory has been mainly used. The NAND flashmemory is a storage device where already recorded data is once erasedand thereafter another data can be recorded again. The NAND flash memorycan constitute a recording device that can be overwritten a plurality oftimes, as can the conventional hard disk.

FIG. 2 is a diagram showing a configuration of the NAND flash memory.The NAND flash memory includes a plurality of physical blocks. Thephysical block is a unit at the time of erasing data recorded in theNAND flash memory. The NAND flash memory has characteristics that datacannot be directly overwritten and that recorded data has to be onceerased in units of physical blocks without fail at the time of datawriting.

This physical block includes a plurality of pages. The page is a unit atthe time of reading data from and writing data into the NAND flashmemory. The page includes a data part and a redundant part. The datapart is an area accessible from the access device as a logical addressspace, and is an area where file data and the like are actually stored.

The redundant part is an area where management information, an ECC andthe like of the recording device having the NAND flash memory isrecorded, and is an area not accessible from the access device. Forexample, the size of the data part is about 4 KB, and the size of theredundant part is about 128 bytes. Further, the size of the physicalblock in the case of focusing only on the data part is about the orderof 4 MB, for example. Therefore, the capacity of the NAND flash memorymade up of 8192 physical blocks each having this size is 32 GB.

With the NAND flash memory having the foregoing characteristics, whenthe recording device is to carry out data writing in the NAND flashmemory in smaller units than the physical block size, it is necessity toperform entrainment saving processing for copying valid data existing inthe same block into another physical block. For this reason, in the caseof writing data in the NAND flash memory in smaller units than the eraseunits, a recording speed decreases.

At the time of performing real-time recording such as video recording bya movie camera or a DSC, when the recording speed decreases, a speed atwhich stream data is recorded into the recording device may not catch upwith a speed at which the stream data is generated, and the real-timerecording may stop. In the video recording by the movie camera or theDSC, there are being recorded precious scenes for the user which cannotbe reproduced, such as those of a sport festival or a wedding ceremony,and hence stopping of the real-time recording is a critical problem.

Conventionally, as a method for solving such a problem, there has beenprovided a method where a data storage area on a recording device ismanaged in fixed-length block units, and real-time recorded stream datais recorded into a fixed-length block whose free area (=stream datarecordable area) has a size equal to or more than a threshold (e.g.,Patent Document 1). In this method, since the size of existing validdata included in an area as a target for stream data recording becomessmall, overhead of the entrainment saving processing becomes small. As aresult, it is possible to prevent the real-time recording from stopping.

Patent Document

Patent Document 1: WO2005/055064

SUMMARY OF INVENTION

In the above conventional technique, when the size of the existing validdata included in each fixed-length block is smaller than the threshold,the block can be used as the target area for stream data recording,thereby to improve the use efficiency of the data storage area at thetime of the real-time recording. However, in the above conventionaltechnique, when even just a little existing valid data exists in eachfixed-length block, it is necessary to record stream data while copyingthe existing valid data by way of the entrainment saving processingduring the real-time recording. This may make it difficult to operatethe recording device at the maximum recording speed.

In contrast, when a fixed-length block not including existing valid datais used as the target area for stream data recording, the entrainmentsaving processing does not occur during the real-time recording, therebyallowing high-speed recording by the recording device. In this case,however, when even just a little existing valid data is included in eachfixed-length block, the stream data cannot be recorded into the block,thus causing deterioration in area use efficiency at the time of thereal-time recording. Especially when recording and deletion of data arerepeatedly carried out on the recording device and the data in therecording device are thereby dispersed and disposed, the deteriorationin area use efficiency is significant.

The present disclosure provides a recording device, an access device, arecording system and a recording method which realize high-speedrecording in the case of performing real-time recording on the recordingdevice, and also improve the area use efficiency at the time of thereal-time recording.

A recording device of the present disclosure operates in accordance withan instruction from an access device. The recording device includes: anonvolatile memory that stores data; a communication unit that receivesan instruction issued by the access device; and a memory controller thatcontrols the nonvolatile memory. When a recording instruction forrecording data into the nonvolatile memory is received from the accessdevice, the memory controller starts recording of data into thenonvolatile memory. Further, when a suspension instruction forsuspending the recording of data is received from the access device, thememory controller stores suspension information into the nonvolatilememory, the suspension information indicating a suspended position as aposition in a recording area of the nonvolatile memory at which the datais being recorded upon reception of the suspension instruction.

An access device of the present disclosure accesses a recording deviceincluding a nonvolatile memory to store data. The access deviceincludes: a recording controller that manages an area in the nonvolatilememory with the area divided into predetermined block length units,searches an unrecorded area in the nonvolatile memory in thepredetermined block length units, and records data into an unrecordedblock; and a communication unit that transmits/receives data to/from therecording device. The recording controller transmits to the recordingdevice a recording instruction for recording data into the nonvolatilememory, when recording data into the unrecorded block. Further, therecording controller transmits to the recording device a suspensioninstruction for instructing suspension of the recording of data, whensuspending the recording of data in the middle of the unrecorded block.

A recording system of the present disclosure includes: a recordingdevice that includes a nonvolatile memory for storing data; and anaccess device that accesses the nonvolatile memory. The access deviceincludes: a recording controller that manages an area in the nonvolatilememory with the area divided into predetermined block length units,searches an unrecorded area in the nonvolatile memory in thepredetermined block length units, and records data into the unrecordedblock; and a first communication unit that transmits/receives datato/from the recording device. The recording device includes: a secondcommunication unit that receives an instruction issued by the accessdevice; and a memory controller that controls the nonvolatile memory.The recording controller of the access device transmits to the recordingdevice a recording instruction for recording data into the nonvolatilememory, when recording data into the unrecorded block. The recordingcontroller of the access device transmits to the recording device asuspension instruction for instructing suspension of the recording ofdata, when suspending the recording of data in the middle of theunrecorded block. When the memory controller of the recording devicereceives the recording instruction from the access device, the memorycontroller of the recording device starts recording of data into thenonvolatile memory. Further, when the memory controller of the recordingdevice receives the suspension instruction from the access device, thememory controller of the recording device stores suspension informationinto the nonvolatile memory, the suspension information indicating asuspended position as a position in a recording area of the nonvolatilememory at which the data is being recorded upon reception of thesuspension instruction.

A recording method of the present disclosure is a recording methodwhere, in a recording system having a recording device that includes anonvolatile memory for storing data and an access device that accessesthe nonvolatile memory, the access device records data into thenonvolatile memory. The recording method includes, in the access device,a step of managing an area in the nonvolatile memory with the areadivided into predetermined block length units, searching an unrecordedarea in the nonvolatile memory in the predetermined block length units,and recording data into the unrecorded block, and a step oftransmitting/receiving data from/to the recording device, and in therecording device, a step of receiving an instruction issued by theaccess device, and a step of controlling the nonvolatile memory. Therecording method further includes, in the access device, a step oftransmitting to the recording device a recording instruction forrecording data into the nonvolatile memory when recording data into theunrecorded block, and a step of transmitting to the recording device asuspension instruction for instructing suspension of the recording ofdata when suspending the recording of data in the middle of theunrecorded block, and in the memory controller, a step of startingrecording of data into the nonvolatile memory when receiving therecording instruction from the access device, and a step of storingsuspension information into the nonvolatile memory when receiving thesuspension instruction from the access device, the suspensioninformation indicating a suspended position as a position in a recordingarea of the nonvolatile memory at which the data is being recorded uponreception of the suspension instruction.

According to an idea of the present disclosure, it is possible toprovide a recording device and the like which allow high-speed recordingin the case of performing real-time recording on the recording device,and also improve the area use efficiency at the time of the real-timerecording.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing a configuration of an access device and arecording device in the present embodiment.

FIG. 2 is a diagram showing a configuration of a NAND flash memory.

FIG. 3 is a flowchart showing data writing processing in a conventionalrecording device.

FIG. 4 shows diagrams illustrating one example of address managementinformation and physical blocks in the conventional recording device.

FIG. 5 is a diagram showing a configuration of address managementinformation in the present embodiment.

FIG. 6 is a sequence chart showing stream recording processing in thecase of non-occurrence of suspension processing in the presentembodiment.

FIG. 7 shows diagrams illustrating states of physical blocks in thepresent embodiment.

FIG. 8 is a sequence chart showing stream recording processing in thecase of occurrence of the suspension processing in the conventionalrecording device.

FIG. 9 shows diagrams illustrating states of physical blocks in theconventional recording device.

FIG. 10 is a sequence chart showing stream recording processing in thecase of occurrence of the suspension processing in the presentembodiment.

FIG. 11 shows other diagrams illustrating states of physical blocks inthe present embodiment.

FIG. 12 shows diagrams illustrating suspended address information in thepresent embodiment.

FIG. 13 shows diagrams illustrating one example of suspended addressinformation updating processing in a second recording controller in therecording device in the present embodiment.

FIG. 14 is a flowchart showing stream data recording processing in afirst recording controller in the case of using first suspended addressinformation in the present embodiment.

FIG. 15 is a flowchart showing stream data recording processing in thesecond recording controller in the case of using the first suspendedaddress information in the present embodiment.

FIG. 16 is a flowchart showing stream data recording processing in thefirst recording controller in the case of using second suspended addressinformation in the present embodiment.

FIG. 17 is a flowchart showing stream data recording processing in thefirst recording controller in the case of using third suspended addressinformation in the present embodiment.

DESCRIPTION OF EMBODIMENTS

Hereinafter, as an embodiment of the present disclosure, a recordingdevice, an access device and a recording system will be described withreference to the drawings.

In detailed descriptions, there may be omitted an unnecessary portionout of descriptions concerning the conventional art and substantiallythe same configuration. This is for simplifying the descriptions.

Further, the following descriptions and the accompanying drawings aredisclosed so that a person skilled in the art can fully understand thepresent disclosure, and are not intended to restrict the subject matterof the claims.

1. Configurations of Access Device and Recording Device

FIG. 1 is a constitutional diagram of a recording system including anaccess device and a recording device in the present embodiment. As shownin FIG. 1, an access device 1 includes a CPU 11, a RAM 12, a firstinterface 13 and a ROM 14.

A program for controlling the access device 1 is stored in the ROM 14.This program uses the RAM 12 as a temporary storage area, and isexecuted by the CPU 11.

The first interface 13 is a connection part for connecting between arecording device 2 and the access device 1, and transmits and receives acontrol signal and data between the recording device 2 and the accessdevice 1.

The CPU 11 includes an application controller 101, a file systemcontroller 102, and an access unit 103. The CPU 11 reads and executesthe program stored in the ROM 14, thereby to realize functions of theapplication controller 101, the file system controller 102 and theaccess unit 103.

The application controller 101 performs control of the entire accessdevice 1, such as generation of data and control of a power supply.

The file system controller 102 performs control for managing data as afile by means of a file system such as a FAT file system.

The access unit 103 controls transmission and reception of a command anddata to and from the recording device 2. For example, the access unit103 is given a size and an address along with data from the file systemcontroller 102, and records the data with the instructed size into theinstructed position in a nonvolatile memory 22 of the recording device2.

The file system controller 102 further includes a first recordingcontroller 104. The first recording controller 104 is a controller forcontrolling selection and decision of a recording area and suspension ofstream recording at the time of real-time recording, as characteristicsof the idea of the present disclosure. The first recording controller104 does not exist in the conventional access device.

Further, as shown in FIG. 1, the recording device 2 includes acontroller 21 and the nonvolatile memory 22.

The controller 21 is a device that performs the entire control of thenonvolatile memory 22. The controller 21 is configured as a system LSIincluding a CPU and the like. The controller 21 includes a secondinterface 211, a CPU 212, a RAM 213, a ROM 214 and a memory interface215.

The second interface 211 is a connection part for connecting between therecording device 2 and the access device 1, and transmits and receives acontrol signal and data between the recording device 2 and the accessdevice 1 similarly to the first interface 13.

A program for controlling the recording device 2 is stored in the ROM214. This program uses the RAM 213 as a temporary storage area, and isexecuted by the CPU 212.

The memory interface 215 is a connection part that connects between thecontroller 21 and the nonvolatile memory 22, and controls transmissionand reception of a command and data to and from the nonvolatile memory22 between the controller 21 and the nonvolatile memory 22.

The CPU 212 includes an address conversion controller 216 and a secondrecording controller 217.

The address conversion controller 216 is a controller that controlsassociation between a physical address on the nonvolatile memory 22 anda logical address in a logical address space provided by the recordingdevice 2 as an address space accessible from the access device 1.

The second recording controller 217 is a controller that controlssuspension of stream recording as a characteristic of the idea of thepresent disclosure, and does not exist in the conventional recordingdevice.

The nonvolatile memory 22 stores address management information 221 intoan area different from an area for storing user data.

The address management information 221 is information used for addressmanagement for a recording area of the nonvolatile memory 22, such asassociation between a physical address and a logical address. The userdata is stored in a logical address space accessible from the accessdevice 1. In contrast, the address management information 221 is storedoutside the logical address space so as not to be accessible from theaccess device 1.

The address management information 221 further includes addressconversion information 222 for managing association between a physicaladdress and a logical address, free block information 223 for managing afree physical block (hereinafter, also referred to as “free block”), andstream management information 224 for managing a block understream-recording. The stream management information 224 is informationfor managing a block under stream-recording as a characteristic of thepresent disclosure, and is one not existing in the conventionalrecording device.

The recording device 2 of the present embodiment stores the streammanagement information 224 in the nonvolatile memory 22.

Using the stream management information 224 stored in the nonvolatilememory 22, the second recording controller 217 of the recording device 2controls allocation of a physical block for the stream recording,suspension and resumption of the stream recording, and the like.

Further, the file system controller 102 of the access device 1 in thepresent embodiment includes the first recording controller 104 thatissues to the recording device 2 an instruction for suspending thestream recording, and the like.

By combining the access device 1 and the recording device 2 describedabove, it is possible to realize high-speed recording by the recordingdevice 2 at the time of performing the real-time recording. Further, byefficiently carrying out suspension and resumption of the real-timerecording, it is possible to improve the area use efficiency at the timeof the real-time recording.

2. Data Writing Processing in Conventional Recording Device

In order to clarify the characteristics of the idea of the presentdisclosure, first, data writing processing in the conventional recordingdevice will be described.

FIG. 3 is a flowchart showing data writing processing in theconventional recording device. FIG. 4 shows diagrams illustrating oneexample of address management information and physical blocks in theconventional recording device.

As shown in FIG. 4, address management information in the conventionalrecording device includes address conversion information, free blockinformation and temporary block information. The address conversioninformation is information for managing association between a logicaladdress and a physical address. The address conversion information is,for example, configured by a table that stores the number of eachphysical block allocated to a corresponding logical block. The freeblock information is information for managing the number of anunallocated free physical block. The temporary block information isinformation for managing a physical block (hereinafter referred to as“temporary block”) that is temporarily used for data copying in order torealize data overwriting processing on a NAND flash memory. Thetemporary block information includes the number of a temporary block andthe number of a physical block (hereinafter referred to as “old datablock”) subjected to the overwriting processing. Further, data that isstored in the old data block and prior to overwriting is referred to as“old data”. It is to be noted that in the present disclosure, the numberof temporary blocks is one for simplifying the description.

Hereinafter, the data writing processing in the conventional recordingdevice will be described using FIG. 3. Here, as one example, a case isassumed where data K and data L are recorded into areas on a second pageand a third page, respectively, of a block with a logical block number0x0002.

(S301) The recording device refers to the address conversioninformation, to acquire the number (hereinafter referred to as“OLD_BLK”) of a physical block storing old data of the writing targetarea. In an example of FIG. 4(a), a physical block number of a logicalblock including the writing target area, which corresponds to thelogical block number 0x0002, is 0x0002, and hence OLD_BLK is 0x0002.

(S302) When acquiring OLD_BLK, the recording device refers to thetemporary block information, to acquire the number (hereinafter referredto as “TEMP_OLD_BLK”) of an old data block. In the example of FIG. 4(a),since an old data block number in the temporary block information is0x0001, TEMP_OLD_BLK is 0x0001.

Here, the temporary block is a block for realizing pseudo overwritingprocessing. The temporary block is ensured separately from the physicalblock storing the old data so that the old data is overwritten on theNAND flash memory. At the time of data recording, the recording deviceonce erases the data in the temporary block, and records new data intothe temporary block. Then, the recording device copies valid data, whichis in the physical block storing the old data and is other than aportion corresponding to the new data, into the temporary block. Thisleads to realization of the pseudo overwriting processing on the NANDflash memory.

(S303) The recording device refers to acquired TEMP_OLD_BLK or thenumber of the temporary block in the temporary block information,thereby to determine whether the temporary block actually exists. Forexample, when the temporary block does not exist, a number showing aninvalid block, such as 0xFFFF, is set to TEMP_OLD_BLK and the temporaryblock number in the temporary block information. Implementation in sucha manner as to indicate non-existence of the temporary block allowsdetermination of the presence of the temporary block. In the example ofFIG. 4(a), TEMP_OLD_BLK stores a valid block number (0x0001), therebyindicating existence of the temporary block. When the temporary blockexists, the recording device proceeds to processing of Step S304, andwhen the temporary block does not exist, it proceeds to processing ofStep S310.

(S304) When determining that the temporary block exists by thedetermination processing of Step S303, the recording device determineswhether the value of OLD_BLK is equal to the value of TEMP_OLD_BLK. Whenthe values are equal to each other, the recording device proceeds toprocessing of Step S305, and when the values are not equal to eachother, it proceeds to processing of Step S306.

(S305) When determining that the value of OLD_BLK is equal to the valueof TEMP_OLD_BLK by the determination processing of Step S304, therecording device determines whether desired data can be written in thetemporary block. As one example of the determination method, there canbe considered a method where it is determined whether data has alreadybeen recorded into a writing target page in the temporary block, and itis determined not to allow writing when data has already been recordedinto the writing target page, while it is determined to allow recordingwhen data has not been recorded. In the example of FIG. 4(a), with thedata E and the data F having already been recorded into a second pageand a third page of the temporary block, respectively, in such a casewhere overwriting in the areas on these two pages is generated, writingin the temporary block cannot be performed. The recording deviceproceeds to processing of Step S313 when writing in the temporary blockcan be performed, and it proceeds to processing of Step S306 whenwriting in the temporary block cannot be performed.

(S306) When this processing is reached, the current temporary blockcannot be used, thus requiring processing for once releasing thetemporary block. This processing is generally called entrainment savingprocessing, or collective processing, of a flash memory, and correspondsto processing from Steps S306 to S309 in the flowchart of FIG. 3. First,the recording device copies valid data of the physical block, indicatedby TEMP_OLD_BLK, into an unrecorded area (already erased area) in thetemporary block. In the example of FIG. 4(a), all data other than thedata B and the data C which are stored in the physical block 0x0001indicated by TEMP_OLD_BLK are copied into corresponding pages in aphysical block 0x01BB as the temporary block.

(S307) Subsequently, the recording device updates the address conversioninformation, to associate a physical block number of the temporary blockwith a logical block corresponding to the old data block. In an exampleof FIG. 4(b), the value of 0x01BB as the physical block number of thetemporary block is registered into an area corresponding to the logicalblock number 0x0001 of the address conversion information.

(S308) Next, the recording device registers the value of TEMP_OLD_BLKinto the free block information. In the example of FIG. 4(b), 0x0001 asthe value of TEMP_OLD_BLK is added to a tail of the free blockinformation.

(S309) At the end of the entrainment saving processing, the recordingdevice clears the temporary block information. In the example of FIG.4(b), information in the temporary block information is cleared (madeinvalid) by setting an invalid block number, or the like. By thisentrainment saving processing, the area of the physical block number0x0001 is changed from the data-stored block to a free block, and thearea of the physical block number 0x01BB is changed from the temporaryblock to a data-stored block. A temporary block does not exist at thepoint of completion of the entrainment saving processing.

(S310) Next, the recording device carries out temporary block acquiringprocessing for recording data. In the flowchart of FIG. 3, thistemporary block acquiring processing corresponds to processing fromSteps S310 to S312. First, the recording device refers to the free blockinformation, to acquire a physical block number registered as a freeblock. In the example of FIG. 4(b), a free block number 0x000Eregistered at the head of the free block information is acquired as thenumber of a recording target block.

(S311) Subsequently, the recording device collectively erases an area ofthe physical block number (0x000E) acquired in Step S310.

(S312) At the end of the temporary block acquiring processing, therecording device deletes the free block number acquired in Step S310from the free block information, and registers it into the temporaryblock information. In an example of FIG. 4(c), the recording devicedeletes the value of the physical block number 0x000E registered at thehead of the free block information from the list of the free blockinformation, and sets the value of 0x000E as a temporary block number ofthe temporary block information. Further, the recording device sets thevalue of OLD_BLK acquired in Step S301 as an old data block number ofthe temporary block information.

(S313) Lastly, the recording device writes desired data into thetemporary block. In the example of FIG. 4(c), data K and data L arewritten into the areas on the second page and the third page of thetemporary block, respectively.

In such a manner, at the time of overwriting data, the recording deviceusing the NAND flash memory needs to ensure a temporary block,collectively erase data in the temporary block, record new data, andcopy old data into the temporary block. When this data copyingprocessing is performed many times, substantial recording time for newdata becomes long, making the recording processing time long, to causedeterioration in performance of the recording device.

Accordingly, in order to realize high-speed recording by the recordingdevice using the NAND flash memory, it is of necessity to reduce thiscopying processing.

In the present disclosure, there is provided a method of reducing thecopying processing in the stream data recording during the real-timerecording to allow high-speed recording by the recording device, andalso improving the area use efficiency.

3. Address Management Information of Present Embodiment

Referring to FIG. 5, a configuration of the address managementinformation 221 of the present embodiment will be described. As shown inFIG. 5, the address management information 221 of the present embodimentincludes the address conversion information 222 and the free blockinformation 223. The address conversion information 222 and the freeblock information 223 are the same as those included in the conventionaladdress management information described in FIG. 4. The addressmanagement information 221 of the present embodiment further includesthe stream management information 224. The stream management information224 is information characteristic of the recording device 2 of thepresent embodiment, and is information not existing in the conventionalrecording device.

The stream management information 224 includes a stream managementnumber, a logical sector number, a logical block number, and a physicalblock number.

At the time of carrying out the stream recording, the recording device 2of the present embodiment acquires a physical block, the inside of whichis entirely a free area, and carries out the stream recording on theacquired physical block. This enables high-speed recording by therecording device.

Further in the recording system of the present embodiment, in the caseof suspending the stream recording at the point of carrying it out tothe middle of the physical block, the access device 1 transmits asuspension instruction for instructing suspension of the streamrecording to the recording device 2. When receiving the suspensioninstruction, the recording device 2 suspends the stream recording. Atthis time, the recording device 2 does not take the physical blockcurrently under stream-recording as a target for the entrainment savingprocessing and holds it as it is so that the recording device 2 cancontinue the stream recording from a suspended position at the time ofsubsequent resumption of the stream recording. That is, when receivingthe suspension instruction, the recording device 2 does not record datainto an unrecorded area in the block including the suspended positionuntil receiving from the access device a resumption instruction forrecording data with the suspended position taken as a recording startposition. Accordingly, even when suspension and resumption of the streamrecording are repeated, stream data can be densely stored in thephysical block, thereby improving the area use efficiency.

The stream management information 224 stores information about thephysical block under stream-recording when the recording device 2receives the suspension instruction. The stream management number is aserial number of information associated with a block which is managedand under stream-recording. In an example shown in FIG. 5, the streammanagement information 224 can store N pieces of information.Accordingly, when a plurality of streams are simultaneously beingrecorded, a plurality of suspended positions can be stored in therecording device 2, thus further enhancing the convenience.

The logical sector number is information indicating a position wherestream data is being recorded at the time of suspension of therecording, and indicates a position other than a logical block boundary.In the example shown in FIG. 5, the stream management information 224indicates that two streams are in a suspended state, and indicates thatstream data has been recorded up to respective logical sector numbers0x4400 and 0x6800. The logical block number is information indicating aposition of a logical block including a logical sector number.

Here, in the example shown in FIG. 5, the size of one logical block isdefined as 4 MB (0x2000 sector), and the size of one sector is definedas 512 bytes, and hence a logical block number including the logicalsector number 0x4400 is 0x0002. Similarly, a logical block numberincluding the logical sector number 0x6800 is 0x0003. The physical blocknumber is information indicating a position of a physical blockassociated with a logical block number. In the example of FIG. 5,physical block numbers associated with the logical block numbers 0x0002and 0x0003 are 0x0002 and 0x0003, respectively.

4. Stream Recording Processing in a Case of Non-Occurrence of SuspensionProcessing in Present Embodiment

Next, with reference to FIGS. 6 and 7, a description will be given ofthe stream recording processing in a case of non-occurrence of thesuspension processing in the present embodiment. FIG. 6 is a diagramshowing a flow of the stream recording processing in the case ofnon-occurrence of the suspension processing in the present embodiment.FIG. 7 shows diagrams illustrating states of the physical blocks at eachtime point in the flow of FIG. 6.

(S601) First, in the file system controller 102 of the access device 1,a stream file is created. Specifically, in order to create a file with afile size of 0 as the stream file on the recording device 2, the filesystem controller 102 of the access device 1 writes file systemmanagement information (information such as a FAT table and a directoryentry in the case of a FAT file as one example) into the nonvolatilememory 22 of the recording device 2 via the access unit 103.

(S602) Subsequently, in the first recording controller 104 of the accessdevice 1, a free block is acquired. In the present embodiment, thelogical address space, which is divided into fixed-length block units(hereinafter each referred to as “allocation unit” (AU)), is managed,and stream data is recorded into an AU, the inside of which is entirelya free area, except for the time of resumption of the stream recordingafter its suspension (including start time of recording of anotherfile). For this reason, prior to the stream recording, the firstrecording controller 104 searches an AU, the inside of which is entirelya free area, as an AU to be allocated for the stream recording, andspecifies its position (hereinafter, the AU whose position has beenspecified in this processing is referred to as AU1). In a case of thefile system being the FAT file system as one example, the firstrecording controller 104 reads the FAT table from the recording device2, and carries out processing of specifying the AU, the inside of whichis entirely a free area, on the FAT table. FIG. 7(a) shows a state ofthe physical block AU1 (physical block number 0x000E) after theprocessing of Step S602. The AU1 is managed as a free area on areamanagement information of the file system such as the FAT table. Sincethe AU1 is in the state of being stored with file data (data A to dataH) deleted in the past, data cannot be overwritten in the AU1 if thisstate remains unchanged.

(S603) Next, the first recording controller 104 collectively erases thedata in the AU1 acquired in Step S602. In the recording device 2 of thepresent embodiment, such as a memory card, which uses a NAND flashmemory as a storage device, an erase command for erasing data isprovided, in addition to a write command for writing data. In thepresent processing, the first recording controller 104 carries outprocessing of issuing an erase command with respect to the area of theAU1. Further, instead of explicitly issuing an erase command, a specialcommand indicating start of the stream data recording into the AU may betransmitted to the recording device 2. When the recording device 2receives this special command, the recording device 2 carries outcollective deletion processing in the recording device 2 as preparationfor the stream data recording into the corresponding area. FIG. 7(b)shows a state of the physical block AU1 after the processing of StepS603.

(S604) Next, the access device 1 transmits to the recording device 2 awrite command for instructing the recording device 2 to record streamdata with the head of the AU1 taken as a start position. In the presentembodiment, the stream data is recorded into the recording device 2 ineach predetermined recording unit (hereinafter referred to as “recordingunit” (RU)). Hence it is possible to ensure, for each write command, aconstant amount of stream data to be transmitted to the recording device2, so as to prevent a recording speed from decreasing due to overhead ofissuing the command. In the processing of Step S604, the access device 1transmits to the recording device 2 a write command for recording dataA′ into one RU(RU1_1) existing at the head of the AU1. The recordingdevice 2 having received the write command records the data A′ into thespecified RU(RU1_1). FIG. 7(c) shows a state of the physical block AU1after the processing of Step S604.

(S605) Subsequently, the access device 1 records stream data into asubsequent area in the AU1. In processing of Step S605, data B′ isrecorded into RU1_2 of the AU1. FIG. 7(d) shows a state of the physicalblock AU1 after the processing of Step S605.

(S606) In a similar manner, the access device 1 records stream data intothe remaining areas in the AU1. Since the AU 1 is made up of eight RUs,stream data is subsequently recorded to the end of RU1_8. FIG. 7(e)shows a state of the physical block AU1 after the processing of StepS606.

(S607) Next, the first recording controller 104 of the access device 1acquires another free AU (AU2) as in Step S602.

(S608) Subsequently, the first recording controller 104 collectivelyerases data in the AU2 as in Step S603. FIG. 7(f) shows states of thephysical blocks AU1 and AU2 after the processing of Step S608. The AU1is in a state where the entire area has already been recorded with thestream data, and the AU2 is in a state where all the areas have alreadybeen erased.

(S609) Subsequently, the access device 1 records stream data I′ into anarea of RU2_1 in the AU2 as in Step S604. FIG. 7(g) shows states of thephysical blocks AU1 and AU2 after the processing of Step S609.

(S610) Subsequently, the access device 1 records stream data J′ into anarea of RU2_2 in the AU2 as in Step S605. FIG. 7(h) shows states of thephysical blocks AU1 and AU2 after the processing of Step S610.

(S611) Subsequently, the access device 1 records stream data into theremaining areas in the AU2 as in Step S606. FIG. 7(i) shows states ofthe physical blocks AU1 and AU2 after the processing of Step S611. Bythe processing up to here, the AU1 and the AU2 have come into stateswhere stream data are stored in all the areas.

Thereafter, similar processing is repeatedly carried out to recordstream data.

Thus, in the present embodiment, as far as the stream recording is notsuspended, an AU is newly acquired, data in the acquired AU iscollectively erased, and stream data is recorded into the AU. Hence itis possible to reduce the copying processing due to the entrainmentsaving processing, so as to perform high-speed recording by therecording device at the time of real-time recording.

5. Stream Recording Processing in a Case of Occurrence of SuspensionProcessing

Next, in order to clarify the difference between the stream recordingprocessing of the present embodiment and the conventional streamrecording processing, first, a procedure for the conventional streamrecording processing in a case of occurrence of the suspensionprocessing will be described with reference to FIGS. 8 and 9, andthereafter, a procedure for the stream recording processing of thepresent embodiment in a case of occurrence of the suspension processingwill be described with reference to FIGS. 10 and 11. FIGS. 8 and 10 arediagrams each showing a flow of the stream recording processing in thecase of occurrence of the suspension processing, and FIGS. 9 and 11 arediagrams showing states of the physical blocks at each time point ineach flow.

5-1. Conventional Stream Recording Processing in the Case of Occurrenceof Suspension Processing

The procedure for the conventional stream recording processing will bedescribed with reference to FIGS. 8 and 9.

(S801 to S804) Since these are the same processing as the streamrecording processing (Steps S601 to S604) in the present embodimentshown in FIG. 6, detailed descriptions are omitted. After the processingof Step S804, the physical block AU1 comes into a state of FIG. 9(c).

(S805) In the example shown in FIG. 8, a case is assumed where thestream recording is suspended at a time point of completion of thestream data recording into RU1_1. This corresponds to a case where arecording stop button is pressed by a user when the video recording isbeing carried out by a movie camera. When the stream recording issuspended, the file system controller 102 of the access device 1completes the stream data recording, and carries out updating of filesystem management information (FAT table, directory entry, etc.)concerning the stream file under recording. Specifically, the recordingprocessing is carried out on the file system management informationstored in areas other than the AU1 where the stream recording has beensuspended.

(S806) When receiving any write command to a block other than the AUunder stream-recording, the recording device 2 carries out theentrainment saving processing on the temporary block described in FIG.3. FIG. 9(d) shows a state of the physical block AU1 after theprocessing of Step S806. Data X2 to X8 stored in the corresponding RUsin the old data block are copied into RUs (RU1_2 to RU1_8) after thedata A′ recorded into RU1_1 by the stream data recording. Aftercompletion of the entrainment saving processing, the AU1 managed as thetemporary block is managed as a data-stored block. Therefore, from thistime on, when data writing in the physical block AU1 is to be carriedout, it is necessary to allocate again a physical block other than thephysical block AU1 as a temporary block as described in FIG. 3, recordnew data into the temporary block, and copy the old data stored in thephysical block AU1 into the temporary block.

(S807) As in Step S801, the file system controller 102 of the accessdevice 1 creates a stream file. This processing is performed for examplein a case where the recording start button is pressed again by the userwhen the video recording is being carried out by the movie camera.

(S808) Next, the file system controller 102 acquires another free AU(AU2) as in Step S802. FIG. 9(e) shows a state of the physical block AU2after the processing of Step S808.

(S809) Subsequently, the file system controller 102 collectively erasesdata in the AU2 as in Step S803. FIG. 9(f) shows a state of the physicalblock AU2 after the processing of Step S809, which is a state where allthe areas in the AU2 have been erased.

(S810) Subsequently, the access device 1 records stream data I′ into anarea of RU2_1 in the AU2 as in Step S804. FIG. 9(g) shows a state of thephysical block AU2 after the processing of Step S810.

(S811) Subsequently, the access device 1 records stream data J′ into anarea of RU2_2 in the AU2. FIG. 9(h) shows a state of the physical blockAU2 after the processing of Step S811. Thereafter, the access device 1carries out the stream data recording processing in a similar manner.

5-2. Stream Recording Processing in a Case of Occurrence of SuspensionProcessing in Present Embodiment

Subsequently, with reference to FIGS. 10 and 11, the stream recordingprocessing in the present embodiment will be described.

(S1001 to S1004) Since these are the same processing as the conventionalstream recording processing (Steps S801 to S804) shown in FIG. 8, adetailed description is omitted. After the processing of Step S1004, thephysical block AU1 comes into a state of FIG. 11(c).

(S1005) In the example shown in FIG. 10, a case is assumed where thestream recording is suspended at a time point of completion of thestream data recording in RU1_1 in the AU1 as in the example shown inFIG. 8. This corresponds to a case where the recording stop button ispressed by the user when the video recording is being carried out by themovie camera. In the present embodiment, at this point, the firstrecording controller 104 of the access device 1 issues to the recordingdevice 2 a special command (suspension instruction command) indicatingsuspension of the stream recording.

(S1006) When receiving the suspension instruction command, the secondrecording controller 217 of the recording device 2 stops the streamrecording. Further, the second recording controller 217 stores, into thestream management information 224, information about the last physicalblock which is under stream-recording at the point of stopping therecording. That is, the second recording controller 217 stores into thestream management information 224 a logical sector number indicating arecording-suspended position, the number of a logical block includingthe position, and the number of a physical block corresponding to thelogical block. Further, when receiving the suspension instructioncommand, the second recording controller 217 prohibits recording of thephysical block including the recording-suspended position into anunrecorded area (e.g., entrainment saving processing) until receiving anext command for instructing resumption of the recording from the accessdevice 1. Moreover, after suspending the recording, the second recordingcontroller 217 creates suspended address information based on the streammanagement information 224, and stores the created suspended addressinformation into the nonvolatile memory 22. Here, the suspended addressinformation is information including a suspended address indicating therecording-suspended position, and information that can be referred to bythe access device 1. The suspended address is a position correspondingto a logical sector number included in the stream management information224. In the present embodiment, for example, the suspended addressinformation is stored in a dedicated register, or in part of theexisting register. The recording device 2 can transmit the suspendedaddress information to the access device 1 in response to a request fromthe access device 1. A detail of the suspended address information willbe described later.

(S1007) When transmitting the suspension instruction command to therecording device 2, the file system controller 102 of the access device1 completes the stream data recording, and carries out updating of filesystem management information (FAT table, directory entry, and the like)about the stream file which has been under recording until that time.Specifically, at this point, the recording processing is carried out onthe file system management information stored in an area other than theAU1 where the stream recording has been suspended. Even when therecording processing is carried out on the area other than the AU1 inthe present processing, the recording into the unrecorded area in thephysical block including the recording-suspended position is prohibited,and hence the recording device 2 in the present embodiment does notcarry out the entrainment saving processing on the area of AU1, andholds the area of AU1 as it is. This enables additional writing ofstream data into the area subsequent to the AU1 at the time ofresumption of the recording which is performed later.

(S1008) Based on the user's instruction (as required), the access device1 turns on and off the power supply. This is, for example, processingthat is performed in a case where, when the video recording is beingcarried out by the movie camera, the user once turns off the powersupply to the movie camera after completing the recording, and thenturns on the power supply to the movie camera at the time of startingthe recording again. In the present embodiment, even when the powersupplies to the access device 1 and the recording device 2 are turnedoff, since the stream management information 224 is stored in thenonvolatile memory 22, the recording device 2 keeps holding necessaryinformation for carrying out additional writing processing on the AUwhere the recording has been suspended. Hence it is possible to carryout the additional writing processing on the AU where the recording hasbeen suspended after turning on the power supply following thesuspension of the recording.

(S1009) As in Step S1001, the file system controller 102 of the accessdevice 1 creates a stream file. This processing is performed for examplein a case where the recording start button is pressed again by the userwhen the video recording is being carried out by the movie camera.

(S1010) Next, the first recording controller 104 of the access device 1requests suspended address information from the second recordingcontroller 217 of the recording device 2. In response to the request,the second recording controller 217 of the recording device 2 transmitsthe suspended address information to the first recording controller 104of the access device 1 via the second interface 211. Accordingly, thefirst recording controller 104 of the access device 1 can acquire thesuspended address information via the first interface 13.

(S1011) Subsequently, the first recording controller 104 of the accessdevice 1 refers to the suspended address information acquired in StepS1010 and the area management information of the file system, to check afree state in the vicinity of the suspended address and determine aposition for resumption of the stream data recording. Here, at the pointwhere the recording device 2 stores the suspended address in theprocessing of Step S1006, the remaining areas in the AU where therecording has been suspended should be being managed as free areas bythe file system. However, for confirmation, the first recordingcontroller 104 again refers to the area management information (FATtable etc.) of the file system, to check whether the remaining areas inthe AU where the recording has been suspended are actually being managedas free areas. If the remaining areas in the AU are not being managed asfree areas, the first recording controller 104 gives up performingadditional writing on the AU indicated by the suspended addressinformation, returns to the processing of Step S1002, newly acquires afree AU, and performs the stream data recording on the acquired AU. Whenthe remaining areas in the AU are being managed as free areas, theaccess device 1 proceeds to processing of Step S1012.

(S1012) When determining that resumption of the stream recording fromthe suspended address is possible in the processing of Step S1011, theaccess device 1 records the stream data with the suspended address (areaof RU1_2 in the example of FIG. 10) taken as a start position. At thistime, the access device 1 may transmit, to the recording device 2,information indicating that stream data recording is additional writing.

(S1013) Subsequently, the access device 1 records stream data into anarea of RU1_3. FIG. 11(d) shows a state of the physical block AU1 afterthe processing of Step S1013.

Thereafter, the access device 1 carries out the stream data recordingprocessing in a similar manner.

In such a manner, the stream recording processing shown in FIG. 10 isdifferent from the stream recording processing shown in FIG. 8 in thatsuspension of the stream data recording is instructed from the accessdevice 1 to the recording device 2 at the time of the suspension, andthe stream management information 224 is held in the recording device 2.Therefore, in the present embodiment, it is possible to performadditional writing in a subsequent area in the AU where the recordinghas been suspended at the time of resumption of the suspension.Accordingly, in the present embodiment, it is possible to performhigh-speed recording by the recording device 2 on writing of stream dataduring the real-time recording, and also improve the area useefficiency.

6. Suspended Address Information

With reference to FIG. 12, a detail of the suspended address informationin the present embodiment will be described.

In the present embodiment, as described above, the recording device 2creates suspended address information indicating a recording-suspendedposition based on the stream management information 224, and stores thecreated suspended address information into a register space of thenonvolatile memory 22. The recording device 2 transmits the storedsuspended address information to the access device 1 in response to arequest from the access device 1. Accordingly, the access device 1 canacquire the suspended address information from the recording device 2 asa register.

FIG. 12 shows three kinds of methods for storing the suspended addressinformation into the register. Any of these three kinds of storagemethods may be adopted. Further, these three kinds of storage methodsmay be switched as appropriate. Moreover, a method other than thesethree kinds may be adopted for the method for storing the suspendedaddress information into the register.

FIG. 12(a) shows suspended address information configured such that allthe (i.e., eight) logical sector numbers included in the streammanagement information 224 are shown to the access device 1 as suspendedaddresses in the register space (Suspended Address 1 to SuspendedAddress 8). In the example of FIG. 12(a), a case is assumed where therecording device 2 can hold up to eight logical sector numbers. However,the number of logical sector numbers is one example, and the recordingdevice 2 may be configured so as to hold one or more of any number oflogical sector numbers.

FIG. 12(b) shows an example of suspended address information in a casewhere only one out of the plurality of logical sector numbers includedin the stream management information 224 is presented in the registerspace to the access device 1. In the present example, Target Slot whichis the number of a logical sector number currently indicated in theregister is also presented to the access device 1. In the case ofadopting the suspended address information of the present example, whenthe logical sector number indicated in the register space is madeswitchable to another logical sector number by an instruction from theaccess device 1, the convenience is further enhanced.

FIG. 12(c) is a diagram showing an example of suspended addressinformation in a case where only one out of the plurality of logicalsector numbers included in the stream management information 224 ispresented to the access device 1 as a suspended address in the registerspace. Note that, in the present example, differently from the exampleshown in FIG. 12(b), the number of the logical sector number currentlyindicated in the register is not presented. In the case of adopting thesuspended address information in the present example, for example, theoldest logical sector number out of the plurality of registered logicalsector numbers may be indicated in the register, or the newest logicalsector number may be indicated in the register. Other than these, alogical sector number with the lowest-numbered address may be indicatedin the register. The logical sector number indicated may be determinedby any method.

FIG. 13 shows diagrams illustrating one example of suspended addressinformation updating processing in the second recording controller 217of the recording device 2 in the case of adopting the suspended addressinformation shown in FIG. 12(c). It is to be noted that in thefollowing, a logical sector number indicating a recording-suspendedposition in the stream management information 224 is also referred to asa suspended address.

In a state of FIG. 13(a), two suspended addresses are registered in thestream management information 224, and one at the head out of the twosuspended addresses is indicated in the register. In this state, whenthe additional writing processing of Step S1012 of FIG. 10 is carriedout on the AU indicated by the suspended address, the head suspendedaddress in the stream management information 224 and the logical andphysical blocks corresponding to the suspended address are cleared(erased). The register is then updated so as to indicate the nextsuspended address, and comes into a state of FIG. 13(b). In this state,when the additional writing is further carried out on the AU indicatedby the suspended address currently shown in the register, this suspendedaddress is also cleared (erased) from the stream management information224. Then, a block number (number indicating invalidity, such as0xFFFFFFFF) indicating non-existence of an AU in the recording-suspendedstate is indicated in the register. Thereby, when the suspended addressinformation indicated in FIG. 12(c) is adopted, the suspended addressesare sequentially indicated in the register and the access device 1 cansequentially acquire the suspended addresses.

7. Recording Resumption Operation of Access Device and Recording Device

Subsequently, with reference to FIGS. 14 to 17, a description will begiven of stream data recording processing in the first recordingcontroller 104 of the access device 1 and stream data recordingprocessing in the second recording controller 217 of the recordingdevice 2, by use of the respective suspended address information ofFIGS. 12(a), 12(b) and 12(c). In the description here, a method fordetermining a stream data recording area and writing of stream dataitself are focused, and other processing (updating processing for filesystem management information, etc.) is omitted.

7-1. Case where all Suspended Addresses are Presented to Access Device

First, a description will be given of stream data recording processingin the access device 1 and the recording device 2 in a case where thesuspended address information shown in FIG. 12(a) is adopted.

7-1-1. Operation of Access Device

Hereinafter, with reference to FIG. 14, a description will be given ofthe stream data recording processing by the first recording controller104 of the access device 1 in the present example.

(S1401) The first recording controller 104 of the access device 1collectively acquires all suspended addresses (Suspended Addresses,hereinafter each referred to as “SA”) from the recording device 2. Whenthe suspended address information shown in FIG. 12(a) is adopted, sinceall the SAs are arrayed and stored in the register, the access device 1can collectively acquire the SAs by reading them from the register.

(S1402) When collectively acquiring the SAs, the first recordingcontroller 104 initializes a counter value i for SA searching to 1.

(S1403) The first recording controller 104 determines whether thecounter value i has exceeded the maximum number of registration (themaximum number of registration is “8” in the case of the example shownin FIG. 12(a)). When the counter value i has exceeded the maximum numberof registration (YES), the first recording controller 104 proceeds toprocessing of Step S1408. When the counter value i has not exceeded themaximum number of registration (NO), the first recording controller 104proceeds to processing of Step S1404.

(S1404) When the counter value i has not exceeded the maximum number ofregistration, the first recording controller 104 refers to an i-th SAout of the SAs collectively acquired in Step S1401, to determine whetherthe stored address is a valid address. Here, the valid address is anaddress existing in the logical address space of the nonvolatile memory22. When the stored address is a valid address (YES), the firstrecording controller 104 proceeds to processing of Step S1405, and whenthe stored address is not a valid address (NO), the first recordingcontroller 104 proceeds to processing of Step S1406.

(S1405) When determining that the stored address is a valid address inthe processing of Step S1404, the first recording controller 104 checks,in the logical block including the corresponding SA, whether areas afterthe SA are all free. This is processing for checking that the areasafter the SA are being managed as free areas also on the file systemmanagement information (FAT table, etc.) upon recording of stream datainto the areas after the SA. When the areas after the SA are free (YES),the first recording controller 104 proceeds to processing of Step S1407,and when the areas after the SA are not free areas (NO), the firstrecording controller 104 proceeds to processing of Step S1406.

(S1406) When the stored address is not a valid address, the firstrecording controller 104 adds 1 to the counter value i and returns tothe processing of Step S1403.

(S1407) When determining that the areas after the SA are free in theprocessing of Step S1405, the first recording controller 104 writesstream data in the target logical block with the i-th SA taken as astart position, and proceeds to processing of Step S1409.

(S1408) When determining that the counter value i has exceeded themaximum number of registration in the processing of Step S1403, thefirst recording controller 104 determines that a logical block likely tobe usable for the stream data recording is not found among the SAsincluded in the suspended address information. Then, the first recordingcontroller 104 newly searches, on the file system managementinformation, a logical block where areas are all free. When finding thelogical block where areas are all free, the first recording controller104 writes stream data into the found logical block.

(S1409) When writing stream data in the logical block, the firstrecording controller 104 subtracts the size of the written stream datafrom the size of all the stream data, to determine whether unrecordedstream data remains. When the unrecorded stream data remains (YES), thefirst recording controller 104 returns to the processing of Step S1401,and when the unrecorded stream data does not remain (NO), the firstrecording controller 104 completes the stream data recording processing.

Thus, in the stream data recording processing shown in FIG. 14, alogical block usable for the stream recording is specified based on thecollectively acquired SAs, and when it is found, the stream recording iscarried out from the suspended position in the corresponding logicalblock.

7-1-2. Operation of Recording Device

Hereinafter, with reference to FIG. 15, a description will be given ofthe stream data recording processing in the second recording controller217 of the recording device 2 in the case where the suspended addressinformation shown in FIG. 12(a) is adopted.

(S1501) The second recording controller 217 of the recording device 2determines whether a writing start address notified by the access device1 as an argument of a write command is equal to any one of the SAs(logical sector numbers) stored in the stream management information224. When the start address is equal to any one of the SAs in the streammanagement information 224 (YES), the second recording controller 217proceeds to processing of Step S1502, and when the start address is notequal to any one of the SAs in the stream management information 224(NO), the second recording controller 217 proceeds to processing of StepS1505.

(S1502) The second recording controller 217 carries out additionalwriting processing on the physical block including the corresponding SAdetermined as being equal to the notified start address in theprocessing of Step S1501, from the middle area in the physical block.Specifically, data is additionally written in the physical block withthe corresponding SA taken as a start position.

(S1503) After additionally writing data, the second recording controller217 clears (deletes) information about the physical block where the datahas been additionally written from the stream management information224.

(S1504) The second recording controller 217 updates the suspendedaddress information (FIG. 12(a)) including the SAs.

(S1505) When determining that the start address is not equal to any oneof the SAs in the stream management information 224 in the processing ofStep S1501, the second recording controller 217 determines whether thenumber of a logical block including the writing start address notifiedby the access device 1 as the argument of the write command exists inthe stream management information 224. When the corresponding logicalblock number exists in the stream management information 224 (YES), thesecond recording controller 217 proceeds to processing of Step S1506,and when the corresponding logical block number does not exist in thestream management information 224 (NO), the second recording controller217 proceeds to processing of Step S1508.

(S1506) When determining that the corresponding logical block numberexists in the stream management information 224 in the processing ofStep S1505, the second recording controller 217 clears (deletes)information about the corresponding logical block from the streammanagement information 224.

(S1507) After clearing the information about the corresponding logicalblock, the second recording controller 217 updates the suspended addressinformation including the SAs (FIG. 12(a)).

(S1508) After updating the suspended address information or whendetermining that the corresponding logical block number does not existin the stream management information 224 in the processing of StepS1505, the second recording controller 217 carries out, as required, theentrainment saving processing on the physical block including thewriting start address notified by the access device 1 as the argument ofthe write command, and then carries out the data writing processing.

(S1509) After completing recording of stream data into the physicalblock including the notified writing start address, the second recordingcontroller 217 subtracts the size of the recorded stream data from thesize of all the stream data, to determine whether unrecorded stream dataremains. When the unrecorded stream data remains (YES), the secondrecording controller 217 returns to the processing of Step S1501, andwhen the unrecorded stream data does not remain (NO), the secondrecording controller 217 completes the stream data recording processing.

Thus, in the stream data recording processing shown in FIG. 15, therecording device 2 determines whether or not an area where the datawriting is instructed from the access device 1 is a suspended address.When the instructed area corresponds to a suspended address, therecording device 2 updates the stream management information 224 and thelike, and additionally writes stream data in a physical block includingthe instructed area.

7-2. Operation (1) of Access Device in the Case where Access Device isPresented with Only One Suspended Address

Hereinafter, with reference to FIG. 16, a description will be given ofthe stream data recording processing in the first recording controller104 of the access device 1 in the case of adopting the suspended addressinformation shown in FIG. 12(b).

(S1601) The first recording controller 104 initializes a counter value(i) for SA searching to 1.

(S1602) Next, the first recording controller 104 determines whether thecounter value i has exceeded the maximum number of registration. Themaximum number of registration is 8, for example. When the counter valuei has exceeded the maximum number of registration (YES), the firstrecording controller 104 proceeds to processing of Step S1608. When thecounter value i has not exceeded the maximum number of registration(NO), the first recording controller 104 proceeds to processing of StepS1603.

(S1603) The access device 1 issues to the recording device 2 a specialcommand for setting Target Slot with the counter value i taken as anargument. With this special command, the recording device 2 is notifiedof the number of Target Slot to be indicated in the register as theargument. When receiving the command, the recording device 2 changes theSA to be indicated in the register to an SA corresponding to Target Slotspecified by the access device 1. That is, the i-th SA comes to beindicated in the register by the processing. The access device 1 refersto the register of the recording device 2, to acquire the SA indicatedtherein.

(S1604) Next, the first recording controller 104 determines whether anaddress indicated by the SA acquired in Step S1603 is a valid address.When the SA is a valid address (YES), the first recording controller 104proceeds to processing of Step S1605, and when the SA is not a validaddress (NO), the first recording controller 104 proceeds to processingof Step S1606.

(S1605) When determining that the SA is a valid address in theprocessing of Step S1604, the first recording controller 104 determineswhether areas after the SA are all free in the logical block includingthe corresponding SA. This is processing for checking that the areasafter the SA are being managed as free areas also on the file systemmanagement information (FAT table, etc.) upon recording of stream datainto the areas after the SA. When the areas after the SA in the logicalblock are free (YES), the first recording controller 104 proceeds toprocessing of Step S1607, and when the areas after the SA in the logicalblock are not free areas (NO), the first recording controller 104proceeds to processing of Step S1606.

(S1606) When determining that the SA is not a valid address in theprocessing of Step S1604, or that areas after the SA in the logicalblock are not free areas in the processing of Step S1605, the firstrecording controller 104 adds 1 to the counter value i and returns tothe processing of Step S1602.

(S1607) When determining that the areas after the SA in the logicalblock are free in the processing of Step S1605, the first recordingcontroller 104 writes stream data in the target logical block with theSA taken as a start position, and proceeds to processing of Step S1609.

(S1608) When the counter value i has exceeded the maximum number ofregistration in the processing of Step S1602, the first recordingcontroller 104 determines that a logical block likely to be usable forthe stream data recording is not found among the logical sector numbers(suspended addresses) indicating suspended positions stored in thestream management information 224. Then, the first recording controller104 newly searches a logical block where areas are all free on the filesystem management information, and when finding the logical block whereareas are all free, the first recording controller 104 writes streamdata in the found logical block.

(S1609) When completing recording of stream data into the logical block,the first recording controller 104 subtracts the size of the recordedstream data from the size of all the stream data, to determine whetherunrecorded stream data remains. When the unrecorded stream data remains(YES), the first recording controller 104 returns to the processing ofStep S1601, and when the unrecorded stream data does not remain (NO),the first recording controller 104 completes the stream data recordingprocessing.

Thus, in the stream data recording processing shown in FIG. 16, thefirst recording controller 104 acquires the SA sequentially from thehead out of the SAs stored in the stream management information 224while changing Target Slot, and specifies a logical block usable for thestream recording. When finding the logical block usable for the streamrecording, the first recording controller 104 carries out the streamrecording from the suspended position (SA) in the corresponding logicalblock.

It is to be noted that the stream data recording processing in thesecond recording controller 217 of the recording device 2 in the case ofadopting the suspended address information shown in FIG. 12(b) is almostthe same as the stream data recording processing described in FIG. 15,and hence a description is omitted.

7-3. Operation (2) of Access Device in the Case where Only One SuspendedAddress is Presented

Hereinafter, a description will be given of the stream data recordingprocessing in the first recording controller 104 of the access device 1in the case of adopting the suspended address information shown in FIG.12(c). The stream data recording processing in the present example willbe described using FIG. 17.

(S1701) The first recording controller 104 of the access device 1 refersto the register of the recording device 2, to acquire an SA.

(S1702) The first recording controller 104 determines whether an addressindicated by the SA acquired in Step S1701 is a valid address. When theaddress indicated by the SA is a valid address (YES), the firstrecording controller 104 proceeds to processing of Step S1703, and whenthe address indicated by the SA is not a valid address (NO), the firstrecording controller 104 proceeds to processing of Step S1705.

(S1703) When determining that the address indicated by the SA in theprocessing of Step S1702 is a valid address, the first recordingcontroller 104 determines whether areas after the SA are all free in thelogical block including the determined SA. This is for checking that theareas after the SA are being managed as free areas also on the filesystem management information (FAT table, etc.) upon recording of streamdata into the areas after the SA. When the areas after the SA are allfree (YES), the first recording controller 104 proceeds to processing ofStep S1704, and when the areas after the SA are not all free (NO), thefirst recording controller 104 proceeds to processing of Step S1705.

(S1704) The first recording controller 104 writes stream data into thetarget logical block with the SA, determined as a valid address, takenas a start position and proceeds to processing of Step S1706.

(S1705) Since a logical block likely to be usable for the stream datarecording is not found among the SAs stored in the register of therecording device 2, the first recording controller 104 newly searches alogical block having areas being all free on the file system managementinformation. When finding the logical block where areas are all free,the first recording controller 104 writes stream data in thecorresponding logical block.

(S1706) When completing recording of stream data into the logical block,the first recording controller 104 subtracts the size of the recordedstream data from the size of all the stream data, to determine whetherunrecorded stream data remains. When the unrecorded stream data remains(YES), the first recording controller 104 returns to the processing ofStep S1701, and when the unrecorded stream data does not remain (NO),the first recording controller 104 completes the stream data recordingprocessing.

Thus, in the stream data recording processing of FIG. 17, it isdetermined whether or not the SA indicated in the register of therecording device 2 is a logical block usable for the stream recording.When the SA is usable for the stream recording, the stream recording iscarried out from the suspended position in the corresponding logicalblock.

It is to be noted that the stream data recording processing in thesecond recording controller 217 of the recording device 2 in the case ofadopting the suspended address information shown in FIG. 12(c) is almostthe same as the stream data recording processing described in FIG. 15,and hence a description is omitted.

As described above, by using the access device 1 and the recordingdevice 2 of the present embodiment in combination and notifying, by theaccess device 1, the recording device 2 of suspension timing for thestream recording, the stream data recording can be resumed from asuspended position. Hence it is possible to perform high-speed recordingby the recording device 2 during the real-time recording, and alsoimprove the area use efficiency.

8. Summary of Present Embodiment

As described above, the recording device 2 of the present embodimentoperates in accordance with an instruction from the access device 1. Therecording device 2 is provided with the nonvolatile memory 22 thatstores data, the second interface 211 that receives an instructionissued by the access device 1, and the second recording controller 217that controls the nonvolatile memory 22. When the second recordingcontroller 217 receives from the access device 1 a recording instructionfor recording data into the nonvolatile memory 22, the second recordingcontroller 217 starts recording of data into the nonvolatile memory 22.When a suspension instruction for suspending the recording of data isreceived from the access device 1, the second recording controller 217stores suspension information into the nonvolatile memory 22, thesuspension information indicating a suspended position as a position ina recording area of the nonvolatile memory 22 at which the data is beingrecorded upon reception of the suspension instruction.

Further, the access device 1 of the present embodiment accesses therecording device 2 including the nonvolatile memory 22 that stores data.The access device 1 is provided with: the first recording controller 104that manages an area in the nonvolatile memory 22 with the area dividedinto predetermined block length units, searches an unrecorded area inthe nonvolatile memory 22 in the predetermined block length units, andrecords data into the unrecorded block; and a first interface thattransmits/receives data between the access device 1 and the recordingdevice 2. The first recording controller 104 transmits to the recordingdevice a recording instruction for recording data into the nonvolatilememory 22 when recording data into the unrecorded block, and transmitsto the recording device a suspension instruction for instructingsuspension of the recording of data, when suspending the recording ofdata in the middle of the unrecorded block.

When suspending recording of data into the nonvolatile memory 22, theaccess device 1 and the recording device 2 which have the aboveconfiguration store in the nonvolatile memory 22 a position in thenonvolatile memory 22 at which the data is being recorded upon thesuspension. Hence it is possible to record data into the nonvolatilememory 22 with the suspended position taken as a start position at thetime of resumption of the data recording, thereby improving the area useefficiency.

Further, the access device 1 searches an unrecorded area in thenonvolatile memory 22 in the predetermined block length units, and whenfinding an unrecorded area, the access device 1 records data into theblock. Hence it is possible to perform high-speed recording by therecording device 2 during the real-time recording.

9. Other Embodiments

Although the embodiment of the present disclosure has been describedabove, the idea of the present disclosure is not restricted to the aboveembodiment. The embodiment can be modified in a range not deviating fromthe gist of the present disclosure. Hereinafter, a description will begiven of other embodiments, to which the idea of the present disclosureis applicable.

Each of the variety of values described in the above embodiment is oneexample, and another value may be used. For example, each of the valuesof the physical block size and page size described in the aboveembodiment is one example, and not restricted to the above values.

Further, although the configuration of the controller 21 of therecording device 2 has been described with reference to FIG. 1 in theabove embodiment, the controller 21 may have another configuration. Forexample, the CPU 212, the RAM 213 and the like in the controller 21 maybe disposed outside the controller 21, or otherwise, other component(s)may be included in the controller 21.

Further, there has been described the example in the above embodimentwhere the address management information 221 stored in the nonvolatilememory 22 of the recording device 2 is made up of the address conversioninformation 222, the free block information 223 and the streammanagement information 224. However, this configuration of the addressmanagement information 221 is one example, and the address managementinformation 221 may have another configuration so long as being capableof realizing similar address management. For example, the addressconversion information 222 may not be realized as a unitary managementtable, but may have such a configuration as to disperse and store datainto the redundant parts in the respective pages. Alternatively, it mayhave such a configuration as to integrally manage the address conversioninformation 222 and the free block information 223 by means of onetable.

Further, in the above embodiment, the number of nonvolatile memories 22used in the recording device 2 is not necessarily one, but a pluralityof nonvolatile memories 22 may be used in combination. Especially whenit is configured such that data can be written in the plurality ofnonvolatile memories 22 in parallel, the writing processing can beperformed at a faster speed. In this case, the management unit describedas the AU in the above embodiment may be realized by bundling aplurality of physical blocks and regarding them as one AU.

Further, in the stream management information 224 described in FIG. 5,the valid suspended addresses are densely stored in the rows of thestream management numbers 1 and 2, in order from the first row. However,the valid suspended addresses may not necessarily be densely managed inorder from the first row to the last row. For example, a valid suspendedaddress may be stored at any position. Further, the logical block numberand the physical block number of the stream management information 224may not necessarily be included in the stream management information224. This is because the logical block number and the physical blocknumber can be derived from the logical sector number. When informationsimilar to the logical block number and the physical block number can bemanaged in a form other than the logical sector number, the informationmay be stored in the form other than the logical sector number.

Further, in FIG. 12(c), there has been described the example where onlyany one suspended address out of a plurality of registered suspendedaddresses is indicated in the register (i.e., the example where only onesuspended address is included in the suspended address information). Inthis case, since the access device 1 has no way to find SAs other thanthe SA indicated in the register, it may not be able to effectively usethe other SAs. Accordingly, the access device 1 and the recording device2 may have such a configuration that an instruction for clearing the SAcurrently on indicated can be issued by the access device 1 to therecording device 2. This makes the use of the suspended addressinformation in the example of FIG. 12(c) more effective. With thisconfiguration, even when the SA currently on indicated cannot be usedfor the stream recording for some reason, the access device 1 canacquire a next SA via the register by issuing an instruction forclearing the SA.

Further, not only in the example shown in FIG. 12(c), but also in thecase of adopting one of the suspended address information shown in FIG.12(a) and the suspended address information shown in FIG. 12(b), it maybe made possible to clear part or the whole of the registered suspendedaddresses by an instruction from the access device 1.

Further, in the example of the stream data recording shown in FIG. 10,it has been described that the idea of the present disclosure is adoptedto the case where, after completion of recording of one stream file, anext stream file is recorded. However, the idea of the presentdisclosure is not restricted to the case of using two stream files, butthe idea of the present disclosure may also be adopted to a case whererecording is suspended and resumed within one stream file.

In the above, the embodiment has been described as an exemplification ofthe technique in the present disclosure. For this, the detaileddescriptions and accompanying drawings have been disclosed. Henceconstituents not essential for solving the problems may be included inthe constituents described in the detailed descriptions and theaccompanying drawings. Accordingly, those nonessential constituentsshould not be immediately recognized as essential from the fact thatthose nonessential constituents are described in the detaileddescriptions and the accompanying drawings.

Further, the above embodiment is for illustrating the technique of thepresent disclosure. Therefore, in the above embodiment, a variety ofmodifications, replacement, addition and/or omission and the like may beperformed within the scope of the claims or equivalents thereof.

INDUSTRIAL APPLICABILITY

The idea of the present disclosure is a technique available in an accessdevice that performs real-time recording, such as a movie camera or aDSC, and a recording device that is used in combination with the accessdevice as a recording medium of the access device, such as a memorycard.

The invention claimed is:
 1. A recording device that operates inaccordance with an instruction from an access device, comprising: a NANDnonvolatile memory that includes a plurality of blocks each having aplurality of recording units in a recording area, and stores data by therecording unit; a communication unit that receives an instruction issuedby the access device; and a memory controller that controls the NANDnonvolatile memory, wherein, when a recording instruction for recordingdata into the NAND nonvolatile memory is received from the accessdevice, the memory controller starts recording of data into the NANDnonvolatile memory when a suspension instruction for suspending therecording of data is received from the access device at a time when thememory controller completes the recording of data for the recordingunit, the memory controller stores suspension information indicating asuspended position as a position in the recording area of the NANDnonvolatile memory at which the data is being recorded upon reception ofthe suspension instruction, and holds a block corresponding to thesuspended position as is a state at the reception of the suspensioninstruction, until receiving a resumption instruction for recording datafrom the access device, and when he resumption instruction is receivedfrom the access device, the memory controller records data to anunrecorded recording unit in the block being recorded based on thesuspension information.
 2. The recording device according to claim 1,wherein the communication unit transmits the suspension information tothe access device.
 3. The recording device according to claim 1, whereinthe NAND nonvolatile memory includes blocks each having a predeterminedsize for storing data, and when the communication unit receives from theaccess device a recording instruction for instructing recording of datainto an unrecorded area in a block including the suspended position, thememory controller deletes the suspension information indicating thesuspended position.
 4. The recording device according to claim 1,wherein the suspension information includes a logical address.
 5. Arecording system comprising: a recording device that includes a NANDnonvolatile memory that includes a plurality of blocks each having aplurality of recording units in a recording area, and stores data by therecording unit; and an access device that accesses the nonvolatilememory, wherein the access device includes a recording controller thatmanages the block, and records data into the block, and a firstcommunication unit that transmits/receives data to/from the recordingdevice, the recording device includes a second communication unit thatreceives an instruction issued by the access device, and a memorycontroller that controls the NAND nonvolatile memory the recordingdevice records data by the recording unit in the NAND nonvolatilememory, in a state of completion of recording data to the recordingunit, the recording controller of the access device transmits to therecording device a recording instruction for recording data into theNAND nonvolatile memory, when recording data into the block, therecording controller of the access device transmits to the recordingdevice a suspension instruction for instructing suspension of therecording of data, when suspending the recording of data in the middleof the unrecorded block, when the memory controller of the recordingdevice receives the recording instruction from the access device, thememory controller of the recording device starts recording of data intothe NAND nonvolatile memory, and when the suspension instruction isreceived from the access device, the memory controller of the recordingdevice stores suspension information, the suspension informationindicating a suspended position as a position in a recording area of theNAND nonvolatile memory at which the data is being recorded uponreception of the suspension instruction, and holds a block correspondingto the suspended position as is a state at the reception of thesuspension instruction, until receiving a resumption instruction forrecording data from the access device, and when the resumptioninstruction is received from the access device, the memory controllerrecords data to an unrecorded recording unit in the block being recordedbased on the suspension information.
 6. A recording method where, in arecording system having a recording device that includes a NANDnonvolatile memory including a plurality of blocks each having aplurality of recording units in a recording area for storing data and anaccess device that accesses the NAND nonvolatile memory, the accessdevice records data into the NAND nonvolatile memory, the methodcomprising: by the access device, managing the block in the NANDnonvolatile memory, and recording data into the block, andtransmitting/receiving data from/to the recording device, by therecording device, receiving an instruction issued by the access device,and controlling the NAND nonvolatile memory, further by the accessdevice, transmitting to the recording device a recording instruction forrecording data into the NAND nonvolatile memory, when recording datainto the unrecorded block, and transmitting to the recording device asuspension instruction for instructing suspension of the recording ofdata, when suspending the recording of data in the middle of theunrecorded block, wherein the controlling and the NAND nonvolatilememory controller comprises starting recording of data into the NANDnonvolatile memory when receiving the recording instruction from theaccess device, the data being recorded by recording unit in the NANDnonvolatile memory, and storing suspension information when thesuspension instruction from the access device is received at a time whenthe memory controller completes the recording of data for the recordingunit, the suspension information indicating a suspended position as aposition in a recording area of the NAND nonvolatile memory at which thedata is being recorded upon reception of the suspension instruction,holding a block corresponding to the suspended position as is a state atthe reception of the suspension instruction, until receiving aresumption instruction for recording data from the access device, andrecording data to an unrecorded recording unit in the block beingrecorded based on the suspension information upon receiving theresumption instruction from the access device.